<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>投票详情页</title>
</head>
<body>
<h1>{{ question.question_text }}</h1>
{#<form action="/polls/{{ question.id }}/vote/" method="post">#}
<form action="{% url 'vote' question_id=question.id %}" method="post">
    {% for choice in question.choice_set.all %}
        <div>
            <label>
                <input type="radio" name="choice_id" value="{{ choice.id }}"> {{ choice.choice_text }}
            </label>
        </div>
    {% endfor %}
    <input type="submit" value="提 交">
</form>
{#<h1>{{ question.question_text }}</h1>#}
{#<ul>#}
{#    {% for choice in question.choice_set.all %}#}
{#        <li>{{ choice.choice_text }}</li>#}
{#    {% endfor %}#}
{#</ul>#}
</body>
</html>